\section{Theory basis}\label{classification}
In this section, we introduce the the theoretical basis of PBDE for nvSRAM based caches. We give the overall architecture of RF energy harvesting based systems, followed by dead blocks classification.
\subsection{Architectural overview}
\begin{figure}[!hpt]
\centering
\includegraphics[scale = 0.34]{classification.pdf}
\caption{Cassification of cache blocks in nvSRAM based L1 Caches}\label{fig2}
\end{figure}

Figure~\ref{fig2} shows three possible cases of cache blocks in nvSRAM based L1 caches. The length of each rectangle indicates the lifetime of each cache block. A cache block is \emph{alive} between the moment when it is filled and the last reference time point by a read/write request. Furthermore, the \emph{death period} is defined as the time interval between two successive cache lifetimes.

Figure~\ref{fig2}(a) shows the case where data in the cache block needs to be backed up into the nonvolatile part. After a cache block is filled, it is accessed by the CPU and its lifetime is prolonged beyond the backup point. Therefore, it needs backup because data in the cache block will be accessed after restore. Otherwise, extra cache misses will be introduced.

Figure~\ref{fig2}(b) and (c) represent the condition under which data in the cache block do not deserve backups. If a cache block is in a dead period at the backup point, then the data in it do not need backup since it will not be accessed again after restore. Hence, they are dead blocks. We classify the class of dead blocks into two subclasses: \emph{dirty death} and \emph{clean death}, as shown in figure~\ref{fig2}(b) and (c) respectively. If the cache block is overwritten by CPU's execution results before it is evicted, then it is classified into the category of dirty death. Otherwise, it is classified into the category of clean death. Note that these two kinds of dead blocks can be simply distinguished by examining the dirty bit. The classification is used to support different operations for data retention. As for dirty death, data should be written back into low level caches in advance, or else CPU's process and cache data will be asymmetric, which causes execution errors. We call it a \emph{pre-wirteback} scheme. As for clean death, data can be directly discarded and it will not risk causing asymmetry between CPU and caches.

\begin{figure}[!hpt]
\centering
\includegraphics[height=1.6in, width=3.2in]{distribution.pdf}
\caption{Distribution of dead blocks}\label{fig3}
\end{figure}

Figure~\ref{fig3} shows the distribution of cache blocks according to the rules of our proposed classification when running SPEC06 benchmark suite on an ARM cortex-A8 CPU. It can be seen from the figure that the distribution varies with different applications. On average, dirty death and clean death occupies 74\% and 7\% of the overall cache blocks respectively, which indicates the potential of our partial backup scheme. In particular, dirty death takes a large portion of cache blocks in leslie3d, sjeng and lbm. This phenomenon is due to the fact that these benchmarks are extremely write-intensive and cache replacements occur frequently. As for libquantum, over 60\% cache blocks are alive. It is due to the high hit rate and less replacements.



